<template>
  <div>
    <!-- 面包屑导航区域 -->
    <el-breadcrumb separator-class="el-icon-arrow-right">
      <el-breadcrumb-item :to="{ path: '/home' }">首页</el-breadcrumb-item>
      <el-breadcrumb-item>添加项目</el-breadcrumb-item>
    </el-breadcrumb>
    <!-- 卡片视图 -->
    <el-card>
      <el-form :model="queryInfo" :rules="addFormRules" ref="addFormRef" label-width="80px" label-position="top" style="overflow-x:auto">
      <!-- <el-row style="margin-bottom: 20px">
        <div style="font-size: 26px; font-weight: bold;">添加项目</div>
      </el-row> -->
      <el-row>
        <el-col style="display: flex">
          <el-form-item label="年份" prop="year" style="padding-right: 10px;" label-width="60px">
            <el-select v-model="queryInfo.year" placeholder="请选择" clearable style="width: 100px">
              <el-option v-for="item in yearlist" :key="item.value" :label="item.label" :value="item.value"></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="序号" prop="serialno" style="padding-right: 10px;" label-width="60px">
            <el-input v-model="queryInfo.serialno" placeholder="请输入" style="width: 170px" clearable></el-input>
          </el-form-item>
          <el-form-item label="区域" prop="area" style="padding-right: 10px;" label-width="60px">
            <el-select v-model="queryInfo.area" placeholder="请选择" clearable style="width: 100px;">
              <el-option v-for="item in arealist" :key="item.value" :label="item.label" :value="item.value"></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="项目名称" prop="projectname" style="padding-right: 10px;">
            <el-input v-model="queryInfo.projectname" placeholder="请输入" style="width: 300px;" clearable></el-input>
          </el-form-item>
          <el-form-item label="委托金额" prop="entrustmoney" style="padding-right: 10px;">
            <el-input v-model="queryInfo.entrustmoney" placeholder="请输入" style="width: 120px;" clearable disabled></el-input>
          </el-form-item>
          <el-form-item label="成本金额" prop="costmoney" style="padding-right: 10px;">
            <el-input v-model="queryInfo.costmoney" placeholder="请输入" style="width: 120px;" clearable disabled></el-input>
          </el-form-item>
          <el-form-item label="不含税价" prop="priceexcludingtax" style="padding-right: 10px;">
            <el-input v-model="queryInfo.priceexcludingtax" placeholder="请输入" :precision="2" style="width: 120px;" clearable disabled></el-input>
          </el-form-item>
          <el-form-item label="结算金额" prop="settlementmoney" style="padding-right: 10px;">
            <el-input v-model="queryInfo.settlementmoney" placeholder="请输入" :precision="2" style="width: 120px;" clearable disabled></el-input>
          </el-form-item>
          <el-form-item label="结算金额不含税" label-width="130px" prop="settlementmoneyexcludingtax" style="padding-right: 10px;">
            <el-input v-model="queryInfo.settlementmoneyexcludingtax" placeholder="请输入" :precision="2" style="width: 120px;" clearable disabled></el-input>
          </el-form-item>
          <!-- <el-form-item label="上家开票（万元）" label-width="130px" prop="previousinvoicing" style="padding-right: 10px;">
            <el-input v-model="queryInfo.previousinvoicing" placeholder="请输入" style="width: 120px;" clearable></el-input>
          </el-form-item>
          <el-form-item label="下家开票（万元）" label-width="130px" prop="nextinvoicing" style="padding-right: 10px;">
            <el-input v-model="queryInfo.nextinvoicing" placeholder="请输入" style="width: 120px;" clearable></el-input>
          </el-form-item> -->
          <el-form-item label="加成率(%)" prop="markuprate" style="padding-right: 10px;">
            <el-input v-model="queryInfo.markuprate" :precision="2" placeholder="请输入" style="width: 90px;" clearable></el-input>
          </el-form-item>
          <el-form-item label="委托时间" prop="entrusttime" style="padding-right: 10px;">
            <el-date-picker v-model="queryInfo.entrusttime" value-format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker>
          </el-form-item>
          <el-form-item label="询价时间" prop="inquirytime" style="padding-right: 10px;">
            <el-date-picker v-model="queryInfo.inquirytime" value-format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker>
          </el-form-item>
          <el-form-item label="合同签订时间" label-width="100px" prop="contractsigntime" style="padding-right: 10px;">
            <el-date-picker v-model="queryInfo.contractsigntime" value-format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker>
          </el-form-item>
          <el-form-item label="终验时间" prop="finalinspectiontime" style="padding-right: 10px;">
            <el-date-picker v-model="queryInfo.finalinspectiontime" value-format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker>
          </el-form-item>
          <el-form-item label="结算时间" prop="settlementtime" style="padding-right: 10px;">
            <el-date-picker v-model="queryInfo.settlementtime" type="date" placeholder="选择日期"></el-date-picker>
          </el-form-item>
          <el-form-item label="维护周期（年）" label-width="120px" prop="maintenancecycle" style="padding-right: 10px;">
            <el-input v-model="queryInfo.maintenancecycle" placeholder="请输入" style="width: 200px;" clearable></el-input>
          </el-form-item>
          <el-form-item label="移动项目编号" label-width="110px" prop="mobileprojectno" style="padding-right: 10px;">
            <el-input v-model="queryInfo.mobileprojectno" placeholder="请输入" style="width: 200px;" clearable></el-input>
          </el-form-item>
          <el-form-item label="项目经理" prop="projectmanager" style="padding-right: 10px;">
            <el-input v-model="queryInfo.projectmanager" placeholder="请输入" style="width: 200px;" clearable></el-input>
          </el-form-item>
          <el-form-item label="服务经理" prop="servicemanager" style="padding-right: 10px;">
            <el-input v-model="queryInfo.servicemanager" placeholder="请输入" style="width: 200px;" clearable></el-input>
          </el-form-item>
          <el-form-item label="当前阶段" prop="currentstage" style="padding-right: 10px;">
            <el-select v-model="queryInfo.currentstage" placeholder="请选择" clearable style="width: 200px; padding-right: 10px;">
              <el-option v-for="item in stagelist" :key="item.value" :label="item.label" :value="item.value"></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="供应商" prop="supplier" style="padding-right: 10px;">
            <el-input v-model="queryInfo.supplier" placeholder="请输入" style="width: 300px; padding-right: 10px;" clearable></el-input>
          </el-form-item>
          <el-form-item label="联系人" prop="contacts" style="padding-right: 10px;">
            <el-input v-model="queryInfo.contacts" placeholder="请输入" style="width: 300px;" clearable></el-input>
          </el-form-item>
          <el-form-item label="委托时现场是否已完工" prop="isfinish" style="padding-right: 10px;">
            <el-select v-model="queryInfo.isfinish" placeholder="请选择" style="width: 150px;">
              <el-option label="是" value="是"></el-option>
              <el-option label="否" value="否"></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="是否已交维" label-width="100px" prop="ismaintain" style="padding-right: 10px;">
            <el-select v-model="queryInfo.ismaintain" placeholder="请选择" style="width: 100px;">
              <el-option label="是" value="是"></el-option>
              <el-option label="否" value="否"></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="项目录入时间" label-width="100px" prop="createtime" style="padding-right: 10px;">
            <el-input v-model="queryInfo.createtime" placeholder="请输入" style="width: 200px;" clearable disabled></el-input>
          </el-form-item>
          <el-form-item label="提计应收" prop="income" style="padding-right: 10px;">
            <el-input v-model="queryInfo.income" placeholder="请输入" style="width: 200px;" clearable></el-input>
          </el-form-item>
          <el-form-item label="提计实收" prop="actuallyincome" style="padding-right: 10px;">
            <el-input v-model="queryInfo.actuallyincome" placeholder="请输入" style="width: 200px;" clearable></el-input>
          </el-form-item>
          <el-form-item label="入账时间" prop="incometime" style="padding-right: 10px;">
            <el-date-picker v-model="queryInfo.incometime" value-format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker>
          </el-form-item>
        </el-col>
      </el-row>
      <!-- <el-row>
        <el-col style="display: flex;">
          <el-form-item label="合同类别" prop="contractsignkind1" style="padding-right: 10px; padding-left: 600px;">
            <el-input v-model="shebei.contractsignkind1" placeholder="请输入" style="width: 100px" clearable disabled></el-input>
          </el-form-item>
          <el-form-item label="委托金额" prop="entrustmoney1" style="padding-right: 10px;">
            <el-input v-model="shebei.entrustmoney1" placeholder="请输入" style="width: 120px;" clearable @blur="js1($event)" @keyup.enter.native="js1($event)"></el-input>
          </el-form-item>
          <el-form-item label="成本金额" prop="costmoney1" style="padding-right: 10px;">
            <el-input v-model="shebei.costmoney1" placeholder="请输入" style="width: 120px;" clearable></el-input>
          </el-form-item>
          <el-form-item label="不含税价" prop="priceexcludingtax1" style="padding-right: 10px;">
            <el-input v-model="shebei.priceexcludingtax1" placeholder="请输入" :precision="2" style="width: 120px;" clearable></el-input>
          </el-form-item>
          <el-form-item label="结算金额" prop="settlementmoney1" style="padding-right: 10px;">
            <el-input v-model="shebei.settlementmoney1" placeholder="请输入" :precision="2" style="width: 120px;" clearable></el-input>
          </el-form-item>
          <el-form-item label="结算金额不含税" label-width="130px" prop="settlementmoneyexcludingtax1" style="padding-right: 10px;">
            <el-input v-model="shebei.settlementmoneyexcludingtax1" placeholder="请输入" :precision="2" style="width: 120px;" clearable></el-input>
          </el-form-item>
          <el-form-item label="税率%" label-width="130px" prop="tax1" style="padding-right: 10px;">
            <el-input v-model="shebei.tax1" placeholder="请输入" :precision="2" style="width: 120px;" clearable></el-input>
          </el-form-item>
        </el-col>
        <el-col style="display: flex">
          <el-form-item label="合同类别" prop="contractsignkind2" style="padding-right: 10px; padding-left: 600px;">
            <el-input v-model="shigong.contractsignkind2" placeholder="请输入" style="width: 100px" clearable disabled></el-input>
          </el-form-item>
          <el-form-item label="委托金额" prop="entrustmoney2" style="padding-right: 10px;">
            <el-input v-model="shigong.entrustmoney2" placeholder="请输入" style="width: 120px;" clearable  @blur="js2($event)" @keyup.enter.native="js2($event)"></el-input>
          </el-form-item>
          <el-form-item label="成本金额" prop="costmoney2" style="padding-right: 10px;">
            <el-input v-model="shigong.costmoney2" placeholder="请输入" style="width: 120px;" clearable></el-input>
          </el-form-item>
          <el-form-item label="不含税价" prop="priceexcludingtax2" style="padding-right: 10px;">
            <el-input v-model="shigong.priceexcludingtax2" placeholder="请输入" :precision="2" style="width: 120px;" clearable></el-input>
          </el-form-item>
          <el-form-item label="结算金额" prop="settlementmoney2" style="padding-right: 10px;">
            <el-input v-model="shigong.settlementmoney2" placeholder="请输入" :precision="2" style="width: 120px;" clearable></el-input>
          </el-form-item>
          <el-form-item label="结算金额不含税" label-width="130px" prop="settlementmoneyexcludingtax2" style="padding-right: 10px;">
            <el-input v-model="shigong.settlementmoneyexcludingtax2" placeholder="请输入" :precision="2" style="width: 120px;" clearable></el-input>
          </el-form-item>
          <el-form-item label="税率%" label-width="130px" prop="tax2" style="padding-right: 10px;">
            <el-input v-model="shigong.tax2" placeholder="请输入" :precision="2" style="width: 120px;" clearable></el-input>
          </el-form-item>
        </el-col>
        <el-col style="display: flex;">
          <el-form-item label="合同类别" prop="contractsignkind3" style="padding-right: 10px; padding-left: 600px;">
            <el-input v-model="jicheng.contractsignkind3" placeholder="请输入" style="width: 100px" clearable disabled></el-input>
          </el-form-item>
          <el-form-item label="委托金额" prop="entrustmoney3" style="padding-right: 10px;">
            <el-input v-model="jicheng.entrustmoney3" placeholder="请输入" style="width: 120px;" clearable @blur="js3($event)" @keyup.enter.native="js3($event)"></el-input>
          </el-form-item>
          <el-form-item label="成本金额" prop="costmoney3" style="padding-right: 10px;">
            <el-input v-model="jicheng.costmoney3" placeholder="请输入" style="width: 120px;" clearable></el-input>
          </el-form-item>
          <el-form-item label="不含税价" prop="priceexcludingtax3" style="padding-right: 10px;">
            <el-input v-model="jicheng.priceexcludingtax3" placeholder="请输入" :precision="2" style="width: 120px;" clearable></el-input>
          </el-form-item>
          <el-form-item label="结算金额" prop="settlementmoney3" style="padding-right: 10px;">
            <el-input v-model="jicheng.settlementmoney3" placeholder="请输入" :precision="2" style="width: 120px;" clearable></el-input>
          </el-form-item>
          <el-form-item label="结算金额不含税" label-width="130px" prop="settlementmoneyexcludingtax3" style="padding-right: 10px;">
            <el-input v-model="jicheng.settlementmoneyexcludingtax3" placeholder="请输入" :precision="2" style="width: 120px;" clearable></el-input>
          </el-form-item>
          <el-form-item label="税率%" label-width="130px" prop="tax3" style="padding-right: 10px;">
            <el-input v-model="jicheng.tax3" placeholder="请输入" :precision="2" style="width: 120px;" clearable></el-input>
          </el-form-item>
        </el-col>
        <el-col style="display: flex;">
          <el-form-item label="合同类别" prop="contractsignkind4" style="padding-right: 10px; padding-left: 600px;">
            <el-input v-model="weihu.contractsignkind4" placeholder="请输入" style="width: 100px" clearable disabled></el-input>
          </el-form-item>
          <el-form-item label="委托金额" prop="entrustmoney4" style="padding-right: 10px;">
            <el-input v-model="weihu.entrustmoney4" placeholder="请输入" style="width: 120px;" clearable @blur="js4($event)" @keyup.enter.native="js4($event)"></el-input>
          </el-form-item>
          <el-form-item label="成本金额" prop="costmoney4" style="padding-right: 10px;">
            <el-input v-model="weihu.costmoney4" placeholder="请输入" style="width: 120px;" clearable></el-input>
          </el-form-item>
          <el-form-item label="不含税价" prop="priceexcludingtax4" style="padding-right: 10px;">
            <el-input v-model="weihu.priceexcludingtax4" placeholder="请输入" :precision="2" style="width: 120px;" clearable></el-input>
          </el-form-item>
          <el-form-item label="结算金额" prop="settlementmoney4" style="padding-right: 10px;">
            <el-input v-model="weihu.settlementmoney4" placeholder="请输入" :precision="2" style="width: 120px;" clearable></el-input>
          </el-form-item>
          <el-form-item label="结算金额不含税" label-width="130px" prop="settlementmoneyexcludingtax4" style="padding-right: 10px;">
            <el-input v-model="weihu.settlementmoneyexcludingtax4" placeholder="请输入" :precision="2" style="width: 120px;" clearable></el-input>
          </el-form-item>
          <el-form-item label="税率%" label-width="130px" prop="tax4" style="padding-right: 10px;">
            <el-input v-model="weihu.tax4" placeholder="请输入" :precision="2" style="width: 120px;" clearable></el-input>
          </el-form-item>
        </el-col>
      </el-row> -->
      <el-row>
        <el-col style="display: flex;">
          <el-form-item label="合同类别" prop="contractsignkind1" style="padding-right: 10px; padding-left: 580px;">
            <el-input v-model="queryInfo.contractsignkind1" placeholder="请输入" style="width: 120px" clearable></el-input>
          </el-form-item>
          <el-form-item label="委托金额" prop="entrustmoney1" style="padding-right: 10px;">
            <el-input v-model="queryInfo.entrustmoney1" placeholder="请输入" style="width: 120px;" clearable @blur="js1($event)" @keyup.enter.native="js1($event)"></el-input>
          </el-form-item>
          <el-form-item label="成本金额" prop="costmoney1" style="padding-right: 10px;">
            <el-input v-model="queryInfo.costmoney1" placeholder="请输入" style="width: 120px;" clearable></el-input>
          </el-form-item>
          <el-form-item label="不含税价" prop="priceexcludingtax1" style="padding-right: 10px;">
            <el-input v-model="queryInfo.priceexcludingtax1" placeholder="请输入" :precision="2" style="width: 120px;" clearable></el-input>
          </el-form-item>
          <el-form-item label="结算金额" prop="settlementmoney1" style="padding-right: 10px;">
            <el-input v-model="queryInfo.settlementmoney1" placeholder="请输入" :precision="2" style="width: 120px;" clearable></el-input>
          </el-form-item>
          <el-form-item label="结算金额不含税" label-width="130px" prop="settlementmoneyexcludingtax1" style="padding-right: 10px;">
            <el-input v-model="queryInfo.settlementmoneyexcludingtax1" placeholder="请输入" :precision="2" style="width: 120px;" clearable></el-input>
          </el-form-item>
          <el-form-item label="税率%" label-width="130px" prop="tax1" style="padding-right: 10px;">
            <el-input v-model="queryInfo.tax1" placeholder="请输入" :precision="2" style="width: 120px;" clearable></el-input>
          </el-form-item>
        </el-col>
        <el-col style="display: flex">
          <el-form-item label="合同类别" prop="contractsignkind2" style="padding-right: 10px; padding-left: 580px;">
            <el-input v-model="queryInfo.contractsignkind2" placeholder="请输入" style="width: 120px" clearable></el-input>
          </el-form-item>
          <el-form-item label="委托金额" prop="entrustmoney2" style="padding-right: 10px;">
            <el-input v-model="queryInfo.entrustmoney2" placeholder="请输入" style="width: 120px;" clearable  @blur="js2($event)" @keyup.enter.native="js2($event)"></el-input>
          </el-form-item>
          <el-form-item label="成本金额" prop="costmoney2" style="padding-right: 10px;">
            <el-input v-model="queryInfo.costmoney2" placeholder="请输入" style="width: 120px;" clearable></el-input>
          </el-form-item>
          <el-form-item label="不含税价" prop="priceexcludingtax2" style="padding-right: 10px;">
            <el-input v-model="queryInfo.priceexcludingtax2" placeholder="请输入" :precision="2" style="width: 120px;" clearable></el-input>
          </el-form-item>
          <el-form-item label="结算金额" prop="settlementmoney2" style="padding-right: 10px;">
            <el-input v-model="queryInfo.settlementmoney2" placeholder="请输入" :precision="2" style="width: 120px;" clearable></el-input>
          </el-form-item>
          <el-form-item label="结算金额不含税" label-width="130px" prop="settlementmoneyexcludingtax2" style="padding-right: 10px;">
            <el-input v-model="queryInfo.settlementmoneyexcludingtax2" placeholder="请输入" :precision="2" style="width: 120px;" clearable></el-input>
          </el-form-item>
          <el-form-item label="税率%" label-width="130px" prop="tax2" style="padding-right: 10px;">
            <el-input v-model="queryInfo.tax2" placeholder="请输入" :precision="2" style="width: 120px;" clearable></el-input>
          </el-form-item>
        </el-col>
        <el-col style="display: flex;">
          <el-form-item label="合同类别" prop="contractsignkind3" style="padding-right: 10px; padding-left: 580px;">
            <el-input v-model="queryInfo.contractsignkind3" placeholder="请输入" style="width: 120px" clearable></el-input>
          </el-form-item>
          <el-form-item label="委托金额" prop="entrustmoney3" style="padding-right: 10px;">
            <el-input v-model="queryInfo.entrustmoney3" placeholder="请输入" style="width: 120px;" clearable @blur="js3($event)" @keyup.enter.native="js3($event)"></el-input>
          </el-form-item>
          <el-form-item label="成本金额" prop="costmoney3" style="padding-right: 10px;">
            <el-input v-model="queryInfo.costmoney3" placeholder="请输入" style="width: 120px;" clearable></el-input>
          </el-form-item>
          <el-form-item label="不含税价" prop="priceexcludingtax3" style="padding-right: 10px;">
            <el-input v-model="queryInfo.priceexcludingtax3" placeholder="请输入" :precision="2" style="width: 120px;" clearable></el-input>
          </el-form-item>
          <el-form-item label="结算金额" prop="settlementmoney3" style="padding-right: 10px;">
            <el-input v-model="queryInfo.settlementmoney3" placeholder="请输入" :precision="2" style="width: 120px;" clearable></el-input>
          </el-form-item>
          <el-form-item label="结算金额不含税" label-width="130px" prop="settlementmoneyexcludingtax3" style="padding-right: 10px;">
            <el-input v-model="queryInfo.settlementmoneyexcludingtax3" placeholder="请输入" :precision="2" style="width: 120px;" clearable></el-input>
          </el-form-item>
          <el-form-item label="税率%" label-width="130px" prop="tax3" style="padding-right: 10px;">
            <el-input v-model="queryInfo.tax3" placeholder="请输入" :precision="2" style="width: 120px;" clearable></el-input>
          </el-form-item>
        </el-col>
        <el-col style="display: flex;">
          <el-form-item label="合同类别" prop="contractsignkind4" style="padding-right: 10px; padding-left: 580px;">
            <el-input v-model="queryInfo.contractsignkind4" placeholder="请输入" style="width: 120px" clearable></el-input>
          </el-form-item>
          <el-form-item label="委托金额" prop="entrustmoney4" style="padding-right: 10px;">
            <el-input v-model="queryInfo.entrustmoney4" placeholder="请输入" style="width: 120px;" clearable @blur="js4($event)" @keyup.enter.native="js4($event)"></el-input>
          </el-form-item>
          <el-form-item label="成本金额" prop="costmoney4" style="padding-right: 10px;">
            <el-input v-model="queryInfo.costmoney4" placeholder="请输入" style="width: 120px;" clearable></el-input>
          </el-form-item>
          <el-form-item label="不含税价" prop="priceexcludingtax4" style="padding-right: 10px;">
            <el-input v-model="queryInfo.priceexcludingtax4" placeholder="请输入" :precision="2" style="width: 120px;" clearable></el-input>
          </el-form-item>
          <el-form-item label="结算金额" prop="settlementmoney4" style="padding-right: 10px;">
            <el-input v-model="queryInfo.settlementmoney4" placeholder="请输入" :precision="2" style="width: 120px;" clearable></el-input>
          </el-form-item>
          <el-form-item label="结算金额不含税" label-width="130px" prop="settlementmoneyexcludingtax4" style="padding-right: 10px;">
            <el-input v-model="queryInfo.settlementmoneyexcludingtax4" placeholder="请输入" :precision="2" style="width: 120px;" clearable></el-input>
          </el-form-item>
          <el-form-item label="税率%" label-width="130px" prop="tax4" style="padding-right: 10px;">
            <el-input v-model="queryInfo.tax4" placeholder="请输入" :precision="2" style="width: 120px;" clearable></el-input>
          </el-form-item>
        </el-col>
        <el-col style="display: flex;">
          <el-form-item label="合同类别" prop="contractsignkind5" style="padding-right: 10px; padding-left: 580px;">
            <el-input v-model="queryInfo.contractsignkind5" placeholder="请输入" style="width: 120px" clearable></el-input>
          </el-form-item>
          <el-form-item label="委托金额" prop="entrustmoney5" style="padding-right: 10px;">
            <el-input v-model="queryInfo.entrustmoney5" placeholder="请输入" style="width: 120px;" clearable @blur="js5($event)" @keyup.enter.native="js4($event)"></el-input>
          </el-form-item>
          <el-form-item label="成本金额" prop="costmoney5" style="padding-right: 10px;">
            <el-input v-model="queryInfo.costmoney5" placeholder="请输入" style="width: 120px;" clearable></el-input>
          </el-form-item>
          <el-form-item label="不含税价" prop="priceexcludingtax5" style="padding-right: 10px;">
            <el-input v-model="queryInfo.priceexcludingtax5" placeholder="请输入" :precision="2" style="width: 120px;" clearable></el-input>
          </el-form-item>
          <el-form-item label="结算金额" prop="settlementmoney5" style="padding-right: 10px;">
            <el-input v-model="queryInfo.settlementmoney5" placeholder="请输入" :precision="2" style="width: 120px;" clearable></el-input>
          </el-form-item>
          <el-form-item label="结算金额不含税" label-width="130px" prop="settlementmoneyexcludingtax5" style="padding-right: 10px;">
            <el-input v-model="queryInfo.settlementmoneyexcludingtax5" placeholder="请输入" :precision="2" style="width: 120px;" clearable></el-input>
          </el-form-item>
          <el-form-item label="税率%" label-width="130px" prop="tax5" style="padding-right: 10px;">
            <el-input v-model="queryInfo.tax5" placeholder="请输入" :precision="2" style="width: 120px;" clearable></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row style="margin-bottom: 20px;text-align: center">
        <el-button type="primary" @click="addProject" :disabled="isadd">录入</el-button>
      </el-row>
      </el-form>
      <pre>
        {{shuju}}
      </pre>
    </el-card>
  </div>
</template>

<script>
export default {
  data() {
    return {
      // 地区列表
      arealist: [{
        value: '市本级',
        label: '市本级'
      }, {
        value: '鹿城',
        label: '鹿城'
      }, {
        value: '瓯海',
        label: '瓯海'
      }, {
        value: '龙湾',
        label: '龙湾'
      }, {
        value: '洞头',
        label: '洞头'
      }, {
        value: '永嘉',
        label: '永嘉'
      }, {
        value: '乐清',
        label: '乐清'
      }, {
        value: '瑞安',
        label: '瑞安'
      }, {
        value: '平阳',
        label: '平阳'
      }, {
        value: '龙港',
        label: '龙港'
      }, {
        value: '苍南',
        label: '苍南'
      }, {
        value: '文成',
        label: '文成'
      }, {
        value: '泰顺',
        label: '泰顺'
      }],
      // 阶段列表
      stagelist: [{
        value: '委托发起',
        label: '委托发起'
      }, {
        value: '比选阶段',
        label: '比选阶段'
      }, {
        value: '合同阶段',
        label: '合同阶段'
      }, {
        value: '项目实施',
        label: '项目实施'
      }, {
        value: '等待验收',
        label: '等待验收'
      }, {
        value: '竣工未结算',
        label: '竣工未结算'
      }, {
        value: '项目完结',
        label: '项目完结'
      }, {
        value: '维护阶段',
        label: '维护阶段'
      }],
      // 是否禁止添加
      isadd: true,
      // 年份列表
      yearlist: [],
      // 获取列表的参数对象
      queryInfo: {
        // 年份
        year: parseInt(new Date().getFullYear()),
        // 序号
        serialno: 'WZICT-2022-261',
        // 区域
        area: '市本级',
        // 项目名称
        projectname: '测试数据',
        // 委托金额
        entrustmoney: 0,
        // 成本金额
        costmoney: 0,
        // 不含税价
        priceexcludingtax: 0,
        // 结算金额
        settlementmoney: 0,
        // 结算金额不含税
        settlementmoneyexcludingtax: 0,
        // 上家开票
        previousinvoicing: null,
        // 下家开票
        nextinvoicing: null,
        // 加成率
        markuprate: '4',
        // 委托时间
        entrusttime: null,
        // 询价时间
        inquirytime: null,
        // 合同签订时间
        contractsigntime: null,
        // 终验时间
        finalinspectiontime: null,
        // 结算时间
        settlementtime: null,
        // 维护周期（年）
        maintenancecycle: '0',
        // 移动项目编号
        mobileprojectno: 'ICT-WZ-202210-1000',
        // 项目经理
        projectmanager: null,
        // 服务经理
        servicemanager: null,
        // 当前阶段
        currentstage: '委托发起',
        // 供应商
        supplier: null,
        // 联系人
        contacts: null,
        // 委托时现场是否已完工
        isfinish: '否',
        // 是否已交维
        ismaintain: '否',
        // 项目录入时间
        createtime: '',
        // 提计应收
        income: '0',
        // 提计实收
        actuallyincome: '0',
        // 入账时间
        incometime: null,
        // 合同类别
        contractsignkind1: '设备',
        // 设备合同委托金额
        entrustmoney1: 0,
        // 成本金额
        costmoney1: 0,
        // 不含税价
        priceexcludingtax1: 0,
        // 结算金额
        settlementmoney1: 0,
        // 结算金额不含税
        settlementmoneyexcludingtax1: 0,
        // 税率%
        tax1: 13,
        // 合同类别
        contractsignkind2: '施工',
        // 施工合同委托金额
        entrustmoney2: 0,
        // 成本金额
        costmoney2: 0,
        // 不含税价
        priceexcludingtax2: 0,
        // 结算金额
        settlementmoney2: 0,
        // 结算金额不含税
        settlementmoneyexcludingtax2: 0,
        // 税率%
        tax2: 9,
        // 合同类别
        contractsignkind3: '集成',
        // 施工合同委托金额
        entrustmoney3: 0,
        // 成本金额
        costmoney3: 0,
        // 不含税价
        priceexcludingtax3: 0,
        // 结算金额
        settlementmoney3: 0,
        // 结算金额不含税
        settlementmoneyexcludingtax3: 0,
        // 税率%
        tax3: 6,
        // 合同类别
        contractsignkind4: '维护',
        // 维护合同委托金额
        entrustmoney4: 0,
        // 成本金额
        costmoney4: 0,
        // 不含税价
        priceexcludingtax4: 0,
        // 结算金额
        settlementmoney4: 0,
        // 结算金额不含税
        settlementmoneyexcludingtax4: 0,
        // 税率%
        tax4: 6,
        // 合同类别
        contractsignkind5: '软件开发',
        // 软件开发合同委托金额
        entrustmoney5: 0,
        // 成本金额
        costmoney5: 0,
        // 不含税价
        priceexcludingtax5: 0,
        // 结算金额
        settlementmoney5: 0,
        // 结算金额不含税
        settlementmoneyexcludingtax5: 0,
        // 税率%
        tax5: 6
      },
      // // 设备
      // shebei: {
      //   // 合同类别
      //   contractsignkind1: '设备',
      //   // 设备合同委托金额
      //   entrustmoney1: 0,
      //   // 成本金额
      //   costmoney1: 0,
      //   // 不含税价
      //   priceexcludingtax1: 0,
      //   // 结算金额
      //   settlementmoney1: 0,
      //   // 结算金额不含税
      //   settlementmoneyexcludingtax1: 0,
      //   // 税率%
      //   tax1: 13
      // },
      // // 施工
      // shigong: {
      //   // 合同类别
      //   contractsignkind2: '施工',
      //   // 施工合同委托金额
      //   entrustmoney2: 0,
      //   // 成本金额
      //   costmoney2: 0,
      //   // 不含税价
      //   priceexcludingtax2: 0,
      //   // 结算金额
      //   settlementmoney2: 0,
      //   // 结算金额不含税
      //   settlementmoneyexcludingtax2: 0,
      //   // 税率%
      //   tax2: 9
      // },
      // // 集成
      // jicheng: {
      //   // 合同类别
      //   contractsignkind3: '集成',
      //   // 施工合同委托金额
      //   entrustmoney3: 0,
      //   // 成本金额
      //   costmoney3: 0,
      //   // 不含税价
      //   priceexcludingtax3: 0,
      //   // 结算金额
      //   settlementmoney3: 0,
      //   // 结算金额不含税
      //   settlementmoneyexcludingtax3: 0,
      //   // 税率%
      //   tax3: 6
      // },
      // // 维护
      // weihu: {
      //   // 合同类别
      //   contractsignkind4: '维护',
      //   // 维护合同委托金额
      //   entrustmoney4: 0,
      //   // 成本金额
      //   costmoney4: 0,
      //   // 不含税价
      //   priceexcludingtax4: 0,
      //   // 结算金额
      //   settlementmoney4: 0,
      //   // 结算金额不含税
      //   settlementmoneyexcludingtax4: 0,
      //   // 税率%
      //   tax4: 6
      // },
      // 合同信息数组
      contractlist: [],
      // 页面显示数据
      shuju: '',
      // shuju2: '',
      // 这是表单的验证规则对象
      addFormRules: {
        // 验证用户名是否合法
        year: [
          { required: true, message: '年份不能为空', trigger: 'blur' }
          // { min: 4, max: 4, message: '长度4个字符', trigger: 'blur' }
          // { type: 'number', message: '必须为数字值', trigger: 'blur' }
          // 验证正整数
          // {
          //   validator: (rule, value, callback) => {
          //     if (/^(?:[1-9]\d*)$/.test(value) == false) {
          //       callback(new Error("请输入正整数"));
          //     } else {
          //       callback();
          //     }
          //   },
          //   trigger: "change",
          // }
        ],
        serialno: [
          { required: true, message: '序号不能为空', trigger: 'blur' },
          { min: 1, max: 15, message: '长度不能超过15个字符', trigger: 'blur' }
        ],
        area: [
          { required: true, message: '区域不能为空', trigger: 'blur' }
        ],
        projectname: [
          { required: true, message: '项目不能为空', trigger: 'blur' },
          { min: 1, max: 40, message: '长度不能超过40个字符', trigger: 'blur' }
        ],
        entrustmoney: [
          { required: true, message: '委托金额不能为空', trigger: 'blur' },
          { pattern: /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/, message: '请输入正确格式,可保留两位小数' }
          // { min: 1, max: 7, message: '长度不能超过7个字符', trigger: 'blur' },
          // 验证正整数
          // {
          //   validator: (rule, value, callback) => {
          //     if (/^(?:[1-9]\d*)$/.test(value) === false) {
          //       callback(new Error('请输入正整数'))
          //     } else {
          //       callback()
          //     }
          //   },
          //   trigger: 'blur'
          // }
        ],
        costmoney: [
          { required: true, message: '成本金额不能为空', trigger: 'blur' },
          { pattern: /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/, message: '请输入正确格式,可保留两位小数' }
          // { min: 1, max: 7, message: '长度不能超过7个字符', trigger: 'blur' },
          // 验证正整数
          // {
          //   validator: (rule, value, callback) => {
          //     if (/^(?:[1-9]\d*)$/.test(value) === false) {
          //       callback(new Error('请输入正整数'))
          //     } else {
          //       callback()
          //     }
          //   },
          //   trigger: 'blur'
          // }
        ],
        priceexcludingtax: [
          { required: true, message: '不能为空', trigger: 'blur' },
          // { min: 1, max: 10, message: '长度不能超过10个字符', trigger: 'blur' },
          { pattern: /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/, message: '请输入正确格式,可保留两位小数' }
        ],
        settlementmoney: [
          { required: true, message: '不能为空', trigger: 'blur' },
          // { min: 1, max: 10, message: '长度不能超过10个字符', trigger: 'blur' },
          { pattern: /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/, message: '请输入正确格式,可保留两位小数' }
        ],
        settlementmoneyexcludingtax: [
          { required: true, message: '不能为空', trigger: 'blur' },
          // { min: 1, max: 10, message: '长度不能超过10个字符', trigger: 'blur' },
          { pattern: /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/, message: '请输入正确格式,可保留两位小数' }
        ],
        markuprate: [
          { required: true, message: '不能为空', trigger: 'blur' },
          // { min: 1, max: 4, message: '长度不能超过4个字符', trigger: 'blur' },
          { pattern: /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/, message: '请输入正确格式,可保留两位小数' }
        ],
        entrusttime: [
          { required: true, message: '委托时间不能为空', trigger: 'blur' }
        ],
        mobileprojectno: [
          { required: true, message: '移动项目编号不能为空', trigger: 'blur' },
          { min: 1, max: 40, message: '长度不能超过18个字符', trigger: 'blur' }
        ]
      }
    }
  },
  mounted() {
    // 定义年份列表 ，当年开始到2017年
    var nowYearList = parseInt(new Date().getFullYear())
    var yearListArr = []
    for (var i = nowYearList; i >= 2017; i--) {
      var yearObj = {}
      yearObj.value = i
      yearObj.label = i
      yearListArr.push(yearObj)
    }
    this.yearlist = yearListArr
  },
  created() {
    this.menuright()
    this.queryInfo.createtime = this.getNowDate()
    // his.queryInfo.entrusttime = this.getNowDate()
    // console.log(this.queryInfo.contractsignkind1)
    // console.log(this.createtime)
  },
  methods: {
    formateDate(datetime) {
      console.log('日期格式转换', datetime)
      function addzero(num) {
        return (num < 10 ? '0' + num : num)
      }
      // console.log(datetime)
      if (datetime === null) {
        return
      }
      var date = new Date(datetime)
      return date.getFullYear() + '-' + (addzero(date.getMonth() + 1)) + '-' + addzero(date.getDate())
    },
    js1(event) {
      this.queryInfo.entrustmoney1 = parseFloat(this.queryInfo.entrustmoney1)
      // console.log(this.queryInfo.entrustmoney1, typeof (this.queryInfo.entrustmoney1))
      // console.log(this.queryInfo.entrustmoney2)
      // console.log(this.queryInfo.entrustmoney3)
      // console.log(this.queryInfo.entrustmoney4)
      // 成本金额=委托金额
      this.queryInfo.costmoney1 = this.queryInfo.entrustmoney1
      // this.queryInfo.costmoney2 = this.queryInfo.entrustmoney2
      // this.queryInfo.costmoney3 = this.queryInfo.entrustmoney3
      // this.queryInfo.costmoney4 = this.queryInfo.entrustmoney4
      // 委托金额合计
      this.queryInfo.entrustmoney = parseFloat(this.queryInfo.entrustmoney1) + parseFloat(this.queryInfo.entrustmoney2) + parseFloat(this.queryInfo.entrustmoney3) + parseFloat(this.queryInfo.entrustmoney4) + parseFloat(this.queryInfo.entrustmoney5)
      // 成本金额合计
      this.queryInfo.costmoney = parseFloat(this.queryInfo.costmoney1) + parseFloat(this.queryInfo.costmoney2) + parseFloat(this.queryInfo.costmoney3) + parseFloat(this.queryInfo.costmoney4) + parseFloat(this.queryInfo.costmoney5)
      // 不含税价计算=委托金额/1.0税率
      this.queryInfo.priceexcludingtax1 = (parseFloat(this.queryInfo.entrustmoney1) / (1 + (parseFloat(this.queryInfo.tax1) / 100))).toFixed(2)
      // console.log('税率1', 1 + (parseFloat(this.shebei.tax1) / 100), typeof (1 + (parseFloat(this.shebei.tax1) / 100)))
      // this.queryInfo.priceexcludingtax2 = (parseFloat(this.queryInfo.entrustmoney2) / 1.09).toFixed(2)
      // this.queryInfo.priceexcludingtax3 = (parseFloat(this.queryInfo.entrustmoney3) / 1.06).toFixed(2)
      // this.queryInfo.priceexcludingtax4 = (parseFloat(this.queryInfo.entrustmoney4) / 1.06).toFixed(2)
      // 不含税价合计
      this.queryInfo.priceexcludingtax = (parseFloat(this.queryInfo.priceexcludingtax1) + parseFloat(this.queryInfo.priceexcludingtax2) + parseFloat(this.queryInfo.priceexcludingtax3) + parseFloat(this.queryInfo.priceexcludingtax4) + parseFloat(this.queryInfo.priceexcludingtax5)).toFixed(2)
      // 结算金额计算
      this.queryInfo.settlementmoney1 = (parseFloat(this.queryInfo.entrustmoney1) + parseFloat(this.queryInfo.entrustmoney1) * parseFloat(this.queryInfo.markuprate) / 100).toFixed(2)
      // 结算金额合计
      this.queryInfo.settlementmoney = (parseFloat(this.queryInfo.settlementmoney1) + parseFloat(this.queryInfo.settlementmoney2) + parseFloat(this.queryInfo.settlementmoney3) + parseFloat(this.queryInfo.settlementmoney4) + parseFloat(this.queryInfo.settlementmoney5)).toFixed(2)
      // 结算金额不含税计算=结算金额/1.0税率
      this.queryInfo.settlementmoneyexcludingtax1 = (parseFloat(this.queryInfo.settlementmoney1) / (1 + (parseFloat(this.queryInfo.tax1) / 100))).toFixed(2)
      // 结算金额不含税合计
      this.queryInfo.settlementmoneyexcludingtax = (parseFloat(this.queryInfo.settlementmoneyexcludingtax1) + parseFloat(this.queryInfo.settlementmoneyexcludingtax2) + parseFloat(this.queryInfo.settlementmoneyexcludingtax3) + parseFloat(this.queryInfo.settlementmoneyexcludingtax4) + parseFloat(this.queryInfo.settlementmoneyexcludingtax5)).toFixed(2)
      // ---------------暂时留着--------------------------------------------------------
      // // 成本金额=委托金额
      // this.shebei.costmoney1 = this.shebei.entrustmoney1
      // // this.queryInfo.costmoney2 = this.queryInfo.entrustmoney2
      // // this.queryInfo.costmoney3 = this.queryInfo.entrustmoney3
      // // this.queryInfo.costmoney4 = this.queryInfo.entrustmoney4
      // // 委托金额合计
      // this.queryInfo.entrustmoney = parseFloat(this.shebei.entrustmoney1) + parseFloat(this.shigong.entrustmoney2) + parseFloat(this.jicheng.entrustmoney3) + parseFloat(this.weihu.entrustmoney4)
      // // 成本金额合计
      // this.queryInfo.costmoney = parseFloat(this.shebei.costmoney1) + parseFloat(this.shigong.costmoney2) + parseFloat(this.jicheng.costmoney3) + parseFloat(this.weihu.costmoney4)
      // // 不含税价计算=委托金额/1.0税率
      // this.shebei.priceexcludingtax1 = (parseFloat(this.shebei.entrustmoney1) / (1 + (parseFloat(this.shebei.tax1) / 100))).toFixed(2)
      // // console.log('税率1', 1 + (parseFloat(this.shebei.tax1) / 100), typeof (1 + (parseFloat(this.shebei.tax1) / 100)))
      // // this.queryInfo.priceexcludingtax2 = (parseFloat(this.queryInfo.entrustmoney2) / 1.09).toFixed(2)
      // // this.queryInfo.priceexcludingtax3 = (parseFloat(this.queryInfo.entrustmoney3) / 1.06).toFixed(2)
      // // this.queryInfo.priceexcludingtax4 = (parseFloat(this.queryInfo.entrustmoney4) / 1.06).toFixed(2)
      // // 不含税价合计
      // this.queryInfo.priceexcludingtax = (parseFloat(this.shebei.priceexcludingtax1) + parseFloat(this.shigong.priceexcludingtax2) + parseFloat(this.jicheng.priceexcludingtax3) + parseFloat(this.weihu.priceexcludingtax4)).toFixed(2)
      // // 结算金额计算
      // this.shebei.settlementmoney1 = (parseFloat(this.shebei.entrustmoney1) + parseFloat(this.shebei.entrustmoney1) * parseFloat(this.queryInfo.markuprate) / 100).toFixed(2)
      // // 结算金额合计
      // this.queryInfo.settlementmoney = (parseFloat(this.shebei.settlementmoney1) + parseFloat(this.shigong.settlementmoney2) + parseFloat(this.jicheng.settlementmoney3) + parseFloat(this.weihu.settlementmoney4)).toFixed(2)
      // // 结算金额不含税计算=结算金额/1.0税率
      // this.shebei.settlementmoneyexcludingtax1 = (parseFloat(this.shebei.settlementmoney1) / (1 + (parseFloat(this.shebei.tax1) / 100))).toFixed(2)
      // // 结算金额不含税合计
      // this.queryInfo.settlementmoneyexcludingtax = (parseFloat(this.shebei.settlementmoneyexcludingtax1) + parseFloat(this.shigong.settlementmoneyexcludingtax2) + parseFloat(this.jicheng.settlementmoneyexcludingtax3) + parseFloat(this.weihu.settlementmoneyexcludingtax4)).toFixed(2)
      event.target.blur()
    },
    js2(event) {
      this.queryInfo.entrustmoney2 = parseFloat(this.queryInfo.entrustmoney2)
      // 成本金额=委托金额
      this.queryInfo.costmoney2 = this.queryInfo.entrustmoney2
      // 委托金额合计
      this.queryInfo.entrustmoney = parseFloat(this.queryInfo.entrustmoney1) + parseFloat(this.queryInfo.entrustmoney2) + parseFloat(this.queryInfo.entrustmoney3) + parseFloat(this.queryInfo.entrustmoney4) + parseFloat(this.queryInfo.entrustmoney5)
      // 成本金额合计
      this.queryInfo.costmoney = parseFloat(this.queryInfo.costmoney1) + parseFloat(this.queryInfo.costmoney2) + parseFloat(this.queryInfo.costmoney3) + parseFloat(this.queryInfo.costmoney4) + parseFloat(this.queryInfo.costmoney5)
      // 不含税价计算=委托金额/1.0税率
      this.queryInfo.priceexcludingtax2 = (parseFloat(this.queryInfo.entrustmoney2) / (1 + (parseFloat(this.queryInfo.tax2) / 100))).toFixed(2)
      // console.log(this.queryInfo.priceexcludingtax1)
      // console.log(this.queryInfo.priceexcludingtax2)
      // console.log(this.queryInfo.priceexcludingtax3)
      // console.log(this.queryInfo.priceexcludingtax4)
      // 不含税价合计
      this.queryInfo.priceexcludingtax = (parseFloat(this.queryInfo.priceexcludingtax1) + parseFloat(this.queryInfo.priceexcludingtax2) + parseFloat(this.queryInfo.priceexcludingtax3) + parseFloat(this.queryInfo.priceexcludingtax4) + parseFloat(this.queryInfo.priceexcludingtax5)).toFixed(2)
      // 结算金额计算
      this.queryInfo.settlementmoney2 = (parseFloat(this.queryInfo.entrustmoney2) + parseFloat(this.queryInfo.entrustmoney2) * parseFloat(this.queryInfo.markuprate) / 100).toFixed(2)
      // console.log(this.queryInfo.settlementmoney1)
      // console.log(this.queryInfo.settlementmoney2)
      // console.log(this.queryInfo.settlementmoney3)
      // console.log(this.queryInfo.settlementmoney4)
      // 结算金额合计
      this.queryInfo.settlementmoney = (parseFloat(this.queryInfo.settlementmoney1) + parseFloat(this.queryInfo.settlementmoney2) + parseFloat(this.queryInfo.settlementmoney3) + parseFloat(this.queryInfo.settlementmoney4) + parseFloat(this.queryInfo.settlementmoney5)).toFixed(2)
      // 结算金额不含税计算=结算金额/1.0税率
      this.queryInfo.settlementmoneyexcludingtax2 = (parseFloat(this.queryInfo.settlementmoney2) / (1 + (parseFloat(this.queryInfo.tax2) / 100))).toFixed(2)
      // 结算金额不含税合计
      this.queryInfo.settlementmoneyexcludingtax = (parseFloat(this.queryInfo.settlementmoneyexcludingtax1) + parseFloat(this.queryInfo.settlementmoneyexcludingtax2) + parseFloat(this.queryInfo.settlementmoneyexcludingtax3) + parseFloat(this.queryInfo.settlementmoneyexcludingtax4) + parseFloat(this.queryInfo.settlementmoneyexcludingtax5)).toFixed(2)
      // -------------暂时留着----------------------------------------------------
      // // 成本金额=委托金额
      // this.shigong.costmoney2 = this.shigong.entrustmoney2
      // // 委托金额合计
      // this.queryInfo.entrustmoney = parseFloat(this.shebei.entrustmoney1) + parseFloat(this.shigong.entrustmoney2) + parseFloat(this.jicheng.entrustmoney3) + parseFloat(this.weihu.entrustmoney4)
      // // 成本金额合计
      // this.queryInfo.costmoney = parseFloat(this.shebei.costmoney1) + parseFloat(this.shigong.costmoney2) + parseFloat(this.jicheng.costmoney3) + parseFloat(this.weihu.costmoney4)
      // // 不含税价计算=委托金额/1.0税率
      // this.shigong.priceexcludingtax2 = (parseFloat(this.shigong.entrustmoney2) / (1 + (parseFloat(this.shigong.tax2) / 100))).toFixed(2)
      // // console.log(this.queryInfo.priceexcludingtax1)
      // // console.log(this.queryInfo.priceexcludingtax2)
      // // console.log(this.queryInfo.priceexcludingtax3)
      // // console.log(this.queryInfo.priceexcludingtax4)
      // // 不含税价合计
      // this.queryInfo.priceexcludingtax = (parseFloat(this.shebei.priceexcludingtax1) + parseFloat(this.shigong.priceexcludingtax2) + parseFloat(this.jicheng.priceexcludingtax3) + parseFloat(this.weihu.priceexcludingtax4)).toFixed(2)
      // // 结算金额计算
      // this.shigong.settlementmoney2 = (parseFloat(this.shigong.entrustmoney2) + parseFloat(this.shigong.entrustmoney2) * parseFloat(this.queryInfo.markuprate) / 100).toFixed(2)
      // // console.log(this.queryInfo.settlementmoney1)
      // // console.log(this.queryInfo.settlementmoney2)
      // // console.log(this.queryInfo.settlementmoney3)
      // // console.log(this.queryInfo.settlementmoney4)
      // // 结算金额合计
      // this.queryInfo.settlementmoney = (parseFloat(this.shebei.settlementmoney1) + parseFloat(this.shigong.settlementmoney2) + parseFloat(this.jicheng.settlementmoney3) + parseFloat(this.weihu.settlementmoney4)).toFixed(2)
      // // 结算金额不含税计算=结算金额/1.0税率
      // this.shigong.settlementmoneyexcludingtax2 = (parseFloat(this.shigong.settlementmoney2) / (1 + (parseFloat(this.shigong.tax2) / 100))).toFixed(2)
      // // 结算金额不含税合计
      // this.queryInfo.settlementmoneyexcludingtax = (parseFloat(this.shebei.settlementmoneyexcludingtax1) + parseFloat(this.shigong.settlementmoneyexcludingtax2) + parseFloat(this.jicheng.settlementmoneyexcludingtax3) + parseFloat(this.weihu.settlementmoneyexcludingtax4)).toFixed(2)
      event.target.blur()
    },
    js3(event) {
      this.queryInfo.entrustmoney3 = parseFloat(this.queryInfo.entrustmoney3)
      // 成本金额=委托金额
      this.queryInfo.costmoney3 = this.queryInfo.entrustmoney3
      // 委托金额合计
      this.queryInfo.entrustmoney = parseFloat(this.queryInfo.entrustmoney1) + parseFloat(this.queryInfo.entrustmoney2) + parseFloat(this.queryInfo.entrustmoney3) + parseFloat(this.queryInfo.entrustmoney4) + parseFloat(this.queryInfo.entrustmoney5)
      // 成本金额合计
      this.queryInfo.costmoney = parseFloat(this.queryInfo.costmoney1) + parseFloat(this.queryInfo.costmoney2) + parseFloat(this.queryInfo.costmoney3) + parseFloat(this.queryInfo.costmoney4) + parseFloat(this.queryInfo.costmoney5)
      // 不含税价计算=委托金额/1.0税率
      this.queryInfo.priceexcludingtax3 = (parseFloat(this.queryInfo.entrustmoney3) / (1 + (parseFloat(this.queryInfo.tax3) / 100))).toFixed(2)
      // 不含税价合计
      this.queryInfo.priceexcludingtax = (parseFloat(this.queryInfo.priceexcludingtax1) + parseFloat(this.queryInfo.priceexcludingtax2) + parseFloat(this.queryInfo.priceexcludingtax3) + parseFloat(this.queryInfo.priceexcludingtax4) + parseFloat(this.queryInfo.priceexcludingtax5)).toFixed(2)
      // 结算金额计算
      this.queryInfo.settlementmoney3 = (parseFloat(this.queryInfo.entrustmoney3) + parseFloat(this.queryInfo.entrustmoney3) * parseFloat(this.queryInfo.markuprate) / 100).toFixed(2)
      // 结算金额合计
      this.queryInfo.settlementmoney = (parseFloat(this.queryInfo.settlementmoney1) + parseFloat(this.queryInfo.settlementmoney2) + parseFloat(this.queryInfo.settlementmoney3) + parseFloat(this.queryInfo.settlementmoney4) + parseFloat(this.queryInfo.settlementmoney5)).toFixed(2)
      // 结算金额不含税计算=结算金额/1.0税率
      this.queryInfo.settlementmoneyexcludingtax3 = (parseFloat(this.queryInfo.settlementmoney3) / (1 + (parseFloat(this.queryInfo.tax3) / 100))).toFixed(2)
      // 结算金额不含税合计
      this.queryInfo.settlementmoneyexcludingtax = (parseFloat(this.queryInfo.settlementmoneyexcludingtax1) + parseFloat(this.queryInfo.settlementmoneyexcludingtax2) + parseFloat(this.queryInfo.settlementmoneyexcludingtax3) + parseFloat(this.queryInfo.settlementmoneyexcludingtax4) + parseFloat(this.queryInfo.settlementmoneyexcludingtax5)).toFixed(2)
      event.target.blur()
    },
    js4(event) {
      this.queryInfo.entrustmoney4 = parseFloat(this.queryInfo.entrustmoney4)
      // 成本金额=委托金额
      this.queryInfo.costmoney4 = this.queryInfo.entrustmoney4
      // 委托金额合计
      this.queryInfo.entrustmoney = parseFloat(this.queryInfo.entrustmoney1) + parseFloat(this.queryInfo.entrustmoney2) + parseFloat(this.queryInfo.entrustmoney3) + parseFloat(this.queryInfo.entrustmoney4) + parseFloat(this.queryInfo.entrustmoney5)
      // 成本金额合计
      this.queryInfo.costmoney = parseFloat(this.queryInfo.costmoney1) + parseFloat(this.queryInfo.costmoney2) + parseFloat(this.queryInfo.costmoney3) + parseFloat(this.queryInfo.costmoney4) + parseFloat(this.queryInfo.costmoney5)
      // 不含税价计算=委托金额/1.0税率
      this.queryInfo.priceexcludingtax4 = (parseFloat(this.queryInfo.entrustmoney4) / (1 + (parseFloat(this.queryInfo.tax4) / 100))).toFixed(2)
      // 不含税价合计
      this.queryInfo.priceexcludingtax = (parseFloat(this.queryInfo.priceexcludingtax1) + parseFloat(this.queryInfo.priceexcludingtax2) + parseFloat(this.queryInfo.priceexcludingtax3) + parseFloat(this.queryInfo.priceexcludingtax4) + parseFloat(this.queryInfo.priceexcludingtax5)).toFixed(2)
      // 结算金额计算
      this.queryInfo.settlementmoney4 = (parseFloat(this.queryInfo.entrustmoney4) + parseFloat(this.queryInfo.entrustmoney4) * parseFloat(this.queryInfo.markuprate) / 100).toFixed(2)
      // 结算金额合计
      this.queryInfo.settlementmoney = (parseFloat(this.queryInfo.settlementmoney1) + parseFloat(this.queryInfo.settlementmoney2) + parseFloat(this.queryInfo.settlementmoney3) + parseFloat(this.queryInfo.settlementmoney4) + parseFloat(this.queryInfo.settlementmoney5)).toFixed(2)
      // 结算金额不含税计算=结算金额/1.0税率
      this.queryInfo.settlementmoneyexcludingtax4 = (parseFloat(this.queryInfo.settlementmoney4) / (1 + (parseFloat(this.queryInfo.tax4) / 100))).toFixed(2)
      // 结算金额不含税合计
      this.queryInfo.settlementmoneyexcludingtax = (parseFloat(this.queryInfo.settlementmoneyexcludingtax1) + parseFloat(this.queryInfo.settlementmoneyexcludingtax2) + parseFloat(this.queryInfo.settlementmoneyexcludingtax3) + parseFloat(this.queryInfo.settlementmoneyexcludingtax4) + parseFloat(this.queryInfo.settlementmoneyexcludingtax5)).toFixed(2)
      event.target.blur()
    },
    js5(event) {
      this.queryInfo.entrustmoney5 = parseFloat(this.queryInfo.entrustmoney5)
      // 成本金额=委托金额
      this.queryInfo.costmoney5 = this.queryInfo.entrustmoney5
      // 委托金额合计
      this.queryInfo.entrustmoney = parseFloat(this.queryInfo.entrustmoney1) + parseFloat(this.queryInfo.entrustmoney2) + parseFloat(this.queryInfo.entrustmoney3) + parseFloat(this.queryInfo.entrustmoney4) + parseFloat(this.queryInfo.entrustmoney5)
      // 成本金额合计
      this.queryInfo.costmoney = parseFloat(this.queryInfo.costmoney1) + parseFloat(this.queryInfo.costmoney2) + parseFloat(this.queryInfo.costmoney3) + parseFloat(this.queryInfo.costmoney4) + parseFloat(this.queryInfo.costmoney5)
      // 不含税价计算=委托金额/1.0税率
      this.queryInfo.priceexcludingtax5 = (parseFloat(this.queryInfo.entrustmoney5) / (1 + (parseFloat(this.queryInfo.tax5) / 100))).toFixed(2)
      // 不含税价合计
      this.queryInfo.priceexcludingtax = (parseFloat(this.queryInfo.priceexcludingtax1) + parseFloat(this.queryInfo.priceexcludingtax2) + parseFloat(this.queryInfo.priceexcludingtax3) + parseFloat(this.queryInfo.priceexcludingtax4) + parseFloat(this.queryInfo.priceexcludingtax5)).toFixed(2)
      // 结算金额计算
      this.queryInfo.settlementmoney5 = (parseFloat(this.queryInfo.entrustmoney5) + parseFloat(this.queryInfo.entrustmoney5) * parseFloat(this.queryInfo.markuprate) / 100).toFixed(2)
      // 结算金额合计
      this.queryInfo.settlementmoney = (parseFloat(this.queryInfo.settlementmoney1) + parseFloat(this.queryInfo.settlementmoney2) + parseFloat(this.queryInfo.settlementmoney3) + parseFloat(this.queryInfo.settlementmoney4) + parseFloat(this.queryInfo.settlementmoney5)).toFixed(2)
      // 结算金额不含税计算=结算金额/1.0税率
      this.queryInfo.settlementmoneyexcludingtax5 = (parseFloat(this.queryInfo.settlementmoney5) / (1 + (parseFloat(this.queryInfo.tax5) / 100))).toFixed(2)
      // 结算金额不含税合计
      this.queryInfo.settlementmoneyexcludingtax = (parseFloat(this.queryInfo.settlementmoneyexcludingtax1) + parseFloat(this.queryInfo.settlementmoneyexcludingtax2) + parseFloat(this.queryInfo.settlementmoneyexcludingtax3) + parseFloat(this.queryInfo.settlementmoneyexcludingtax4) + parseFloat(this.queryInfo.settlementmoneyexcludingtax5)).toFixed(2)
      event.target.blur()
    },
    async menuright() {
      console.log('路径', window.location.hash.slice(2).toLowerCase())
      const { data: res } = await this.$http.get('menuright?path=' + window.location.hash.slice(2).toLowerCase() + '&rid=' + sessionStorage.getItem('rid'))

      console.log('权限菜单查询结果', res)
      if (res.meta.status === 404) {
        window.history.back()
        return this.$message.error('您无权访问该页面！已退回前一页')
      }
      console.log('显示当前页面所拥有的权限', res.right3ji)
      // 该页面上有上传附件，下载附件，和删除附件功能
      res.right3ji.forEach(item => {
        if (item.authName === '添加项目') {
          this.isadd = false
        }
      })
    },
    // 获取日期YYYY-MM-dd
    getNowDate() {
      function addzero(num) {
        return (num < 10 ? '0' + num : num)
      }
      var date = new Date()
      var year = date.getFullYear() // 年
      var month = addzero(date.getMonth() + 1)// 月
      var day = addzero(date.getDate()) // 日
      return year + '-' + month + '-' + day
    },
    addProject() {
      this.$refs.addFormRef.validate(async valid => {
        if (!valid) return
        // console.log(this.queryInfo.costmoney.typeof())
        // console.log(this.queryInfo.projectname.typeof())
        // console.log('委托金额' + typeof this.queryInfo.costmoney)
        this.queryInfo.entrusttime = this.formateDate(this.queryInfo.entrusttime)
        this.queryInfo.inquirytime = this.formateDate(this.queryInfo.inquirytime)
        this.queryInfo.contractsigntime = this.formateDate(this.queryInfo.contractsigntime)
        this.queryInfo.finalinspectiontime = this.formateDate(this.queryInfo.finalinspectiontime)
        this.queryInfo.settlementtime = this.formateDate(this.queryInfo.settlementtime)
        this.queryInfo.incometime = this.formateDate(this.queryInfo.incometime)
        // console.log('委托日期', this.queryInfo.entrusttime, typeof this.queryInfo.entrusttime)
        // 数字字段转浮点数
        this.queryInfo.entrustmoney = parseFloat(this.queryInfo.entrustmoney)
        this.queryInfo.costmoney = parseFloat(this.queryInfo.costmoney)
        this.queryInfo.priceexcludingtax = parseFloat(this.queryInfo.priceexcludingtax)
        this.queryInfo.settlementmoney = parseFloat(this.queryInfo.settlementmoney)
        this.queryInfo.settlementmoneyexcludingtax = parseFloat(this.queryInfo.settlementmoneyexcludingtax)
        this.queryInfo.markuprate = parseFloat(this.queryInfo.markuprate)
        this.queryInfo.income = parseFloat(this.queryInfo.income)
        this.queryInfo.actuallyincome = parseFloat(this.queryInfo.actuallyincome)
        // this.queryInfo.maintenancecycle = parseFloat(this.queryInfo.maintenancecycle)
        // -------------------------------------------------------
        // this.queryInfo.entrustmoney1 = parseFloat(this.queryInfo.entrustmoney1)
        // this.queryInfo.costmoney1 = parseFloat(this.queryInfo.costmoney1)
        this.queryInfo.priceexcludingtax1 = parseFloat(this.queryInfo.priceexcludingtax1)
        this.queryInfo.settlementmoney1 = parseFloat(this.queryInfo.settlementmoney1)
        this.queryInfo.settlementmoneyexcludingtax1 = parseFloat(this.queryInfo.settlementmoneyexcludingtax1)
        // this.queryInfo.entrustmoney2 = parseFloat(this.queryInfo.entrustmoney2)
        // this.queryInfo.costmoney2 = parseFloat(this.queryInfo.costmoney2)
        this.queryInfo.priceexcludingtax2 = parseFloat(this.queryInfo.priceexcludingtax2)
        this.queryInfo.settlementmoney2 = parseFloat(this.queryInfo.settlementmoney2)
        this.queryInfo.settlementmoneyexcludingtax2 = parseFloat(this.queryInfo.settlementmoneyexcludingtax2)
        // this.queryInfo.entrustmoney3 = parseFloat(this.queryInfo.entrustmoney3)
        // this.queryInfo.costmoney3 = parseFloat(this.queryInfo.costmoney3)
        this.queryInfo.priceexcludingtax3 = parseFloat(this.queryInfo.priceexcludingtax3)
        this.queryInfo.settlementmoney3 = parseFloat(this.queryInfo.settlementmoney3)
        this.queryInfo.settlementmoneyexcludingtax3 = parseFloat(this.queryInfo.settlementmoneyexcludingtax3)
        // this.queryInfo.entrustmoney4 = parseFloat(this.queryInfo.entrustmoney4)
        // this.queryInfo.costmoney4 = parseFloat(this.queryInfo.costmoney4)
        this.queryInfo.priceexcludingtax4 = parseFloat(this.queryInfo.priceexcludingtax4)
        this.queryInfo.settlementmoney4 = parseFloat(this.queryInfo.settlementmoney4)
        this.queryInfo.settlementmoneyexcludingtax4 = parseFloat(this.queryInfo.settlementmoneyexcludingtax4)
        this.queryInfo.priceexcludingtax5 = parseFloat(this.queryInfo.priceexcludingtax5)
        this.queryInfo.settlementmoney5 = parseFloat(this.queryInfo.settlementmoney5)
        this.queryInfo.settlementmoneyexcludingtax5 = parseFloat(this.queryInfo.settlementmoneyexcludingtax5)
        this.queryInfo.tax1 = this.queryInfo.tax1 / 100
        this.queryInfo.tax2 = this.queryInfo.tax2 / 100
        this.queryInfo.tax3 = this.queryInfo.tax3 / 100
        this.queryInfo.tax4 = this.queryInfo.tax4 / 100
        this.queryInfo.tax5 = this.queryInfo.tax5 / 100
        // -------------------------------------------------------
        // console.log('委托金额' + typeof this.queryInfo.costmoney)
        // console.log(typeof this.queryInfo.costmoney)
        // console.log(typeof this.queryInfo.priceexcludingtax)
        // console.log(typeof this.queryInfo.settlementmoney)
        // console.log(typeof this.queryInfo.settlementmoneyexcludingtax)
        console.log(this.queryInfo)
        // -----------暂时留着--------------
        // if (this.shebei.entrustmoney1 !== 0) {
        //   this.contractlist.push(this.shebei)
        // }
        // if (this.shigong.entrustmoney2 !== 0) {
        //   this.contractlist.push(this.shigong)
        // }
        // if (this.jicheng.entrustmoney3 !== 0) {
        //   this.contractlist.push(this.jicheng)
        // }
        // if (this.weihu.entrustmoney4 !== 0) {
        //   this.contractlist.push(this.weihu)
        // }
        // console.log('contractlist', this.contractlist)
        // -----------暂时留着--------------
        // 页面显示数据
        this.shuju = this.queryInfo
        // this.shuju2 = this.contractlist
        // 参数调整
        // if (entrustmoney1 === '0') {
        // }

        const { data: res } = await this.$http.post('project', this.queryInfo)
        if (res.meta.status !== 200) return this.$message.error('添加失败！')
        console.log('返回结果', res)
        this.$message.success('添加工程项目成功！')
        // this.$router.push('projectlists')
      })
    }
  }
}
</script>

<style lang="less" scoped>
.el-form {
  .el-form-item {
    // margin-bottom: 20px;
    /deep/ .el-form-item__label {
      padding:0;
      line-height: 25px;
    }

  }
}
</style>
